import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Home from '@/components/Home'
import ArticleList from '@/components/ArticleList'
import CateMana from '@/components/CateMana'
import DataCharts from '@/components/DataCharts'
import PostArticle from '@/components/PostArticle'
import UserMana from '@/components/UserMana'
import BlogDetail from '@/components/BlogDetail'
import Register from '@/components/Register'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: '登录',
      hidden: true,
      component: Login
    },{
      path: '/Register',
      name: '注册',
      hidden: true,
      component: Register
    }, {
      path: '/home',
      name: '',
      component: Home,
      hidden: true
    },  {
      path: '/home',
      component: Home,
      name: '个人信息',
      iconCls: 'fa fa-bar-chart',
      children: [
        {
          path: '/charts',
          iconCls: 'fa fa-bar-chart',
          name: '个人信息',
          component: DataCharts
        }
      ]
    },{
      path: '/home',
      component: Home,
      name: '建模',
      children: [
        {
          path: '/cateMana',
          iconCls: 'fa fa-reorder',
          name: '建模',
          component: CateMana
        }
      ]
    }, {
      path: '/home',
      component: Home,
      name: '预测',
      iconCls: 'fa fa-file-text-o',
      children: [
        {
          path: '/postArticle',
          name: '预测',
          component: PostArticle,
          meta: {
            keepAlive: true
          }
        }
        ]
    }, {
      path: '/home',
      component: Home,
      name: '历史数据',
      children: [
        {
          path: '/user',
          iconCls: 'fa fa-user-o',
          name: '历史数据',
          component: UserMana
        }
      ]
    },
     {
      path: '/home',
      component: Home,
      name: '建模',
      children: [
        {
          path: '/articleList',
          name: '建模结果',
          component: ArticleList,
          meta: {
            keepAlive: true
          }
        }
      ]
    }
    ]
})
